set(stars_platform "ascend310B" "ascend310Besl" "ascend310Bemu" "ascend310Brc" "ascend310Brcesl" "ascend310Brcemu" "ascend910B" "ascend920esl" "ascend920emu" "as31xm1")
if (${PRODUCT} IN_LIST stars_platform)
    if (${PRODUCT_SIDE} STREQUAL host)
        set(stars_depends ascend_trs_pm_adapt drv_pcie_host)
    else ()
        set(stars_depends ascend_trs_pm_adapt)
    endif ()
endif ()

if (${PRODUCT_SIDE} STREQUAL host)
    list(APPEND MAKE_ARGS
        PRODUCT_SIDE=host
    )
    set(ts_agent_depends drv_devdrv_host drv_devmng_host drv_seclib_host drv_virtmng_host drv_devmm_host ${stars_depends} ascend_uda)
    add_host_ko(LOCAL_MODULE ts_agent
        KO_SRC_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}
        MAKE_ARGS ${MAKE_ARGS}
        TARGETE_DPENDS "${ts_agent_depends}")
else ()
    list(APPEND MAKE_ARGS
        PRODUCT_SIDE=device
    )
    set(ts_agent_depends drv_devdrv drv_devmng drv_seclib_host drv_virtmng_host ${stars_depends} ascend_uda)
    add_device_ko(LOCAL_MODULE ts_agent
        KO_SRC_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}
        MAKE_ARGS ${MAKE_ARGS}
        TARGETE_DPENDS "${ts_agent_depends}")
endif ()
